package com.mrd.gtimpframe.service.impl;

import com.mrd.gtimpframe.entity.RejectRecordReasonRef;
import com.mrd.gtimpframe.entity.RejectRecordReasonRefKey;
import com.mrd.gtimpframe.entity.RejectStatistics;
import com.mrd.gtimpframe.repository.RejectRecordReasonRefMapper;
import com.mrd.gtimpframe.service.RejectRecordReasonRefService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by dusy on 2017/7/31.
 */
@Service
public class RejectRecordReasonRefServiceImpl implements RejectRecordReasonRefService {
    @Autowired
    private RejectRecordReasonRefMapper rejectRecordReasonRefMapper;

    @Override
    @Transactional
    public int deleteByPrimaryKey(RejectRecordReasonRefKey key) {
        return rejectRecordReasonRefMapper.deleteByPrimaryKey(key);
    }

    @Override
    @Transactional
    public int insert(RejectRecordReasonRef record) {
        return rejectRecordReasonRefMapper.insert(record);
    }

    @Override
    @Transactional
    public int insertSelective(RejectRecordReasonRef record) {
        return rejectRecordReasonRefMapper.insertSelective(record);
    }

    @Override
    public RejectRecordReasonRef selectByPrimaryKey(RejectRecordReasonRefKey key) {
        return rejectRecordReasonRefMapper.selectByPrimaryKey(key);
    }

    @Override
    @Transactional
    public int updateByPrimaryKeySelective(RejectRecordReasonRef record) {
        return rejectRecordReasonRefMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    @Transactional
    public int updateByPrimaryKey(RejectRecordReasonRef record) {
        return updateByPrimaryKey(record);
    }

    /**
     * 驳回原因统计
     */
    @Override
    public List<RejectStatistics> rejectStatistics(RejectStatistics params) {
        return rejectRecordReasonRefMapper.rejectStatistics(params);
    }
}
